<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<form>
  <div class="form-row">
    <div class="col-md-4 mb-3">
      <label >友情链接名称</label>
      <input type="text" class="form-control" id="name" value="${link.name }" required>
    </div>
    <div class="col-md-4 mb-3">
      <label >友情链接地址</label>
      <input type="text" class="form-control" id="url" value="${link.url }" required>
    </div>
    </div>
    <input class="btn btn-primary" type="button" onclick="updateLink()" value="添加数据"/>
 </form> 
 
 
 <script type="text/javascript">
	function updateLink(){
		var name=$("#name").val();
		var url=$("#url").val();
		$.post("/admin/updateLinkData",{id:${link.id},name:name,url:url},function(date){
			alert(data)
			if(data=="success"){
				//局部刷新友情链接的列表页面
				showWork("/admin/linklist")
			}
		})
	}
</script> 